import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long S = sc.nextLong();
        long[] a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextLong();
        }
        Arrays.sort(a);//从小到大排序
        double sum = 0;
        double avg = (double) S/n;
        for (int i = 0; i < n; i++) {
            //把钱全部交了的人
            if(a[i]*(n-i)<S) {
                sum += (a[i]-avg)*(a[i]-avg); //求标准差的第一步
                S -= a[i]; //更新还差多少钱
            } else {
                //不需要把钱全交了的人
                double cur_avg = (double) S/(n-i);//重新计算avg
                //如果这个人都可以付得起，那么后面的人肯定也能付得起，所以直接*(n-i)
                sum += (cur_avg-avg)*(cur_avg-avg)*(n-i);
                break;
            }
        }
        System.out.printf("%.4f",Math.sqrt(sum/n));
    }

}